package com.zzg.srb.core.service;

import com.zzg.srb.core.entity.pojo.BorrowInfo;
import com.baomidou.mybatisplus.extension.service.IService;
import com.zzg.srb.core.entity.vo.BorrowInfoApprovalVo;

import java.math.BigDecimal;
import java.util.List;
import java.util.Map;

/**
 * <p>
 * 借款信息表 服务类
 * </p>
 *
 * @author zhengzg
 * @since 2022-05-27
 */
public interface BorrowInfoService extends IService<BorrowInfo> {

    /**
     * 获取借款额度
     * @param userId
     * @return
     */
    BigDecimal getBorrowAmount(Long userId);

    /**
     * 提交借款申请
     * @param borrowInfo
     * @param userId
     */
    void saveBorrowInfo(BorrowInfo borrowInfo, Long userId);

    /**
     * 获取借款申请审批额度
     * @param userId
     * @return
     */
    Integer getStatusByUserId(Long userId);

    /**
     * 借款信息列表
     * @return
     */
    List<BorrowInfo> selectList();

    /**
     * 获取借款信息
     * @param id
     * @return
     */
    Map<String, Object> getBorrowInfoDetail(Long id);

    /**
     * 审批u借款信息
     * @param borrowInfoApprovalVo
     */
    void approval(BorrowInfoApprovalVo borrowInfoApprovalVo);
}
